package com.ruoyi.web.domain;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 微信支付流水日志对象 wx_pay_log
 * 
 * @author ruoyi
 * @date 2024-12-19
 */
public class WxPayLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 日志类型 */
    @Excel(name = "日志类型", readConverterExp = "ORDER=订单,REFUND=退款,NOTIFY=回调")
    @NotBlank(message = "日志类型不能为空")
    @Size(max = 32, message = "日志类型不能超过32个字符")
    private String logType;

    /** 商户订单号 */
    @Excel(name = "商户订单号")
    @Size(max = 64, message = "商户订单号不能超过64个字符")
    private String outTradeNo;

    /** 微信支付订单号 */
    @Excel(name = "微信支付订单号")
    @Size(max = 64, message = "微信支付订单号不能超过64个字符")
    private String transactionId;

    /** 用户openid */
    @Excel(name = "用户openid")
    @Size(max = 128, message = "用户openid不能超过128个字符")
    private String openid;

    /** 操作类型 */
    @Excel(name = "操作类型")
    @NotBlank(message = "操作类型不能为空")
    @Size(max = 64, message = "操作类型不能超过64个字符")
    private String operation;

    /** 请求数据 */
    private String requestData;

    /** 响应数据 */
    private String responseData;

    /** 结果代码 */
    @Excel(name = "结果代码")
    @Size(max = 32, message = "结果代码不能超过32个字符")
    private String resultCode;

    /** 结果消息 */
    @Excel(name = "结果消息")
    @Size(max = 255, message = "结果消息不能超过255个字符")
    private String resultMsg;

    /** 金额（分） */
    @Excel(name = "金额", suffix = "分")
    private Integer amount;

    /** 状态 */
    @Excel(name = "状态", readConverterExp = "0=失败,1=成功")
    @NotNull(message = "状态不能为空")
    private Integer status;

    /** 错误信息 */
    private String errorMsg;

    /** IP地址 */
    @Excel(name = "IP地址")
    @Size(max = 128, message = "IP地址不能超过128个字符")
    private String ipAddress;

    /** 用户代理 */
    @Size(max = 500, message = "用户代理不能超过500个字符")
    private String userAgent;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setLogType(String logType) 
    {
        this.logType = logType;
    }

    public String getLogType() 
    {
        return logType;
    }

    public void setOutTradeNo(String outTradeNo) 
    {
        this.outTradeNo = outTradeNo;
    }

    public String getOutTradeNo() 
    {
        return outTradeNo;
    }

    public void setTransactionId(String transactionId) 
    {
        this.transactionId = transactionId;
    }

    public String getTransactionId() 
    {
        return transactionId;
    }

    public void setOpenid(String openid) 
    {
        this.openid = openid;
    }

    public String getOpenid() 
    {
        return openid;
    }

    public void setOperation(String operation) 
    {
        this.operation = operation;
    }

    public String getOperation() 
    {
        return operation;
    }

    public void setRequestData(String requestData) 
    {
        this.requestData = requestData;
    }

    public String getRequestData() 
    {
        return requestData;
    }

    public void setResponseData(String responseData) 
    {
        this.responseData = responseData;
    }

    public String getResponseData() 
    {
        return responseData;
    }

    public void setResultCode(String resultCode) 
    {
        this.resultCode = resultCode;
    }

    public String getResultCode() 
    {
        return resultCode;
    }

    public void setResultMsg(String resultMsg) 
    {
        this.resultMsg = resultMsg;
    }

    public String getResultMsg() 
    {
        return resultMsg;
    }

    public void setAmount(Integer amount) 
    {
        this.amount = amount;
    }

    public Integer getAmount() 
    {
        return amount;
    }

    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }

    public void setErrorMsg(String errorMsg) 
    {
        this.errorMsg = errorMsg;
    }

    public String getErrorMsg() 
    {
        return errorMsg;
    }

    public void setIpAddress(String ipAddress) 
    {
        this.ipAddress = ipAddress;
    }

    public String getIpAddress() 
    {
        return ipAddress;
    }

    public void setUserAgent(String userAgent) 
    {
        this.userAgent = userAgent;
    }

    public String getUserAgent() 
    {
        return userAgent;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("logType", getLogType())
            .append("outTradeNo", getOutTradeNo())
            .append("transactionId", getTransactionId())
            .append("openid", getOpenid())
            .append("operation", getOperation())
            .append("requestData", getRequestData())
            .append("responseData", getResponseData())
            .append("resultCode", getResultCode())
            .append("resultMsg", getResultMsg())
            .append("amount", getAmount())
            .append("status", getStatus())
            .append("errorMsg", getErrorMsg())
            .append("ipAddress", getIpAddress())
            .append("userAgent", getUserAgent())
            .append("createTime", getCreateTime())
            .append("remark", getRemark())
            .toString();
    }
}
